derivation of demand curve from revealed preference theory